package com.nineclock.approve.resolver;

import cn.hutool.json.JSONObject;
import org.activiti.bpmn.model.EndEvent;
import org.activiti.bpmn.model.Process;

// 结束节点处理器
public class EndNodeResolver extends ProcessNodeResolver{

    @Override
    public void addFlowNodeToActiviti(Process process, JSONObject currNode, JSONObject nextNode) {
        // 创建结束节点
        EndEvent endEvent = new EndEvent();
        endEvent.setId(getNodeId(currNode));
        endEvent.setName(currNode.getStr("name"));
        process.addFlowElement(endEvent);

    }
}
